<?php

 

class wxapi_explorer_file
{

	function __construct($theme=''){
		if($theme){
			$this->theme = $theme;
		}
		if(ECAE_MODE==true){
			$this->storager = kernel::single('wxapi_explorer_dbsave');
		}else{
			$this->storager = kernel::single('wxapi_explorer_fssave');
		}
		$this->storager->theme = $theme;
	}
	public function set_theme($theme){
		$this->theme = $theme;
		$this->storager->theme = $theme;
	}
    
    public function file_list($filter){
		return $this->storager->file_list($filter);
                    }

    
    public function parse_filter($file) 
    {
		return $this->storager->parse_filter($file);
    }//End Function

    
    public function delete_file($file) 
    {
        return $this->storager->delete_file($file);
    }//End Function

    
    public function get_file($file) 
    {
		return $this->storager->get_file($file);
    }//End Function

    
    public function get_file_baklist($filter, $fname) 
    {
		return $this->storager->get_file_baklist($filter, $fname);
    }//End Function
    
    
    public function get_file_instancelist($filter, $fname) 
    {
		return $this->storager->get_file_instancelist($filter, $fname);
    }//End Function
        
    
    public function backup_file($file) 
    {
       return $this->storager->backup_file($file);
    }//End Function
    
    
    public function save_source($file, $source) 
    {
        return $this->storager->save_source($file, $source);
    }//End Function

    
    public function save_image($file, $_file) 
    {
        return $this->storager->save_image($file, $_file);
    }//End Function

    
    public function recover_file($file) 
    {
		return $this->storager->recover_file($file);
    }//End Function

    public function is_dir_writable($dir) 
    {
		return $this->storager->is_dir_writable($dir);
    }//End Function

    public function is_file_writable($file) 
    {
		return $this->storager->is_file_writable($file);
    }//End Function
}
